package com.example.paging3samples.network

import com.example.paging3samples.network.model.anime.PostPage
import com.example.paging3samples.network.model.konachan.KoNaChan
import kotlinx.coroutines.flow.Flow
import retrofit2.http.GET
import retrofit2.http.Path

interface ApiService {

    companion object {
//        const val BASE_URL = "https://konachan.net/"
        const val BASE_URL = "https://anime-pictures.net/"
    }

    @GET("v2/data/category/Girl/type/Girl/page/{pageNumber}/count/10")
    suspend fun getCategories(@Path("pageNumber") pageNumber: Int) : PageResult

    @GET("post.json")
    suspend fun getKoNaChanList(): Flow<List<KoNaChan>>

    @GET("pictures/view_posts/{pageNumber}?type=json")
    suspend fun getPosts(@Path("pageNumber") pageNumber: Int): PostPage
}